home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Tool Chest / !Interfaces / Universal Interfaces 2.0a1 / PInterfaces / Folders.p < prev    next >
Encoding:
Text File  |  1994-07-17  |  2.6 KB  |  91 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Folders.p
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a1.  ETO #15, MPW prerelease.  Sunday, July 17, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. }
  16.  
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT Folders;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __FOLDERS__}
  27. {$SETC __FOLDERS__ := 1}
  28.  
  29. {$I+}
  30. {$SETC FoldersIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {    ConditionalMacros.p                                            }
  38.  
  39. {$IFC UNDEFINED __FILES__}
  40. {$I Files.p}
  41. {$ENDC}
  42. {    MixedMode.p                                                    }
  43. {    OSUtils.p                                                    }
  44.  
  45. {$PUSH}
  46. {$ALIGN MAC68K}
  47. {$LibExport+}
  48.  
  49. CONST
  50.     kOnSystemDisk                = $8000;
  51.     kCreateFolder                = true;
  52.     kDontCreateFolder            = false;
  53.     kSystemFolderType            = 'macs';                        { the system folder }
  54.     kDesktopFolderType            = 'desk';                        { the desktop folder; objects in this folder show on the desk top. }
  55.     kTrashFolderType            = 'trsh';                        { the trash folder; objects in this folder show up in the trash }
  56.     kWhereToEmptyTrashFolderType = 'empt';                        { the "empty trash" folder; Finder starts empty from here down }
  57.     kPrintMonitorDocsFolderType    = 'prnt';                        { Print Monitor documents }
  58.     kStartupFolderType            = 'strt';                        { Finder objects (applications, documents, DAs, aliases, to...) to open at startup go here }
  59.     kAppleMenuFolderType        = 'amnu';                        { Finder objects to put into the Apple menu go here }
  60.     kControlPanelFolderType        = 'ctrl';                        { Control Panels go here (may contain INITs) }
  61.     kExtensionFolderType        = 'extn';                        { Finder extensions go here }
  62.     kFontsFolderType            = 'font';                        { Fonts go here }
  63.     kPreferencesFolderType        = 'pref';                        { preferences for applications go here }
  64.     kTemporaryFolderType        = 'temp';
  65.  
  66. {$IFC SystemSevenOrLater }
  67.  
  68. FUNCTION FindFolder(vRefNum: INTEGER; folderType: OSType; createFolder: BOOLEAN; VAR foundVRefNum: INTEGER; VAR foundDirID: LONGINT): OSErr;
  69.     {$IFC NOT GENERATINGCFM}
  70.     INLINE $7000, $A823;
  71.     {$ENDC}
  72. {$ELSEC}
  73.  
  74. FUNCTION FindFolder(vRefNum: INTEGER; folderType: OSType; createFolder: BOOLEAN; VAR foundVRefNum: INTEGER; VAR foundDirID: LONGINT): OSErr;
  75. {$ENDC}
  76. FUNCTION ReleaseFolder(vRefNum: INTEGER; folderType: OSType): OSErr;
  77.     {$IFC NOT GENERATINGCFM}
  78.     INLINE $700B, $A823;
  79.     {$ENDC}
  80.  
  81. {$ALIGN RESET}
  82. {$POP}
  83.  
  84. {$SETC UsingIncludes := FoldersIncludes}
  85.  
  86. {$ENDC} {__FOLDERS__}
  87.  
  88. {$IFC NOT UsingIncludes}
  89.  END.
  90. {$ENDC}
  91.